<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:103:"D:\phpStudy2018\PHPTutorial\WWW\xbs22\supermarket\public/../application/index\view\reap_ress\user_list.html";i:1540196022;s:84:"D:\phpStudy2018\PHPTutorial\WWW\xbs22\supermarket\application\index\view\layout.html";i:1540197846;}*/ ?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>超市 </title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta name="renderer" content="webkit">
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="icon" type="image/png" href="/static/images/favicon.png">
	<link href="/static/css/amazeui.min.css" rel="stylesheet" type="text/css" />
	<link href="/static/css/style.css" rel="stylesheet" type="text/css" />
	<script src="/static/js/jquery-1.10.2.min.js"></script>
	<script src="/static/js/time.js"></script>
	<script src="/static/js/popup.mini.js"></script>
	<link rel="stylesheet" href="/static/layui/css/layui.css" />
	<script src="/static/layui/layui.js"></script>
</head>
<body style="background: #f6f6f6;">

<header data-am-widget="header" class="am-header am-header-default sq-head ">
	<div class="am-header-left am-header-nav">
		<a href="javascript:history.back()" class="">
			<i class="am-icon-chevron-left"></i>
		</a>
	</div>
	<h1 class="am-header-title">
		<a href="" class="">管理收货地址</a>
	</h1>
	<div class="am-header-right am-header-nav">
		<a href="<?php echo url('index/ReapRess/ress'); ?>" class="">
			<i class="am-icon-plus"></i>
		</a>
	</div>
</header>
<div style="height: 49px;"></div>
<ul class="address-list">
	<?php if(is_array($ress) || $ress instanceof \think\Collection || $ress instanceof \think\Paginator): $i = 0; $__LIST__ = $ress;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>
	<li class="curr">
		<p>收货人：<?php echo $row['ress_name']; ?>&nbsp;&nbsp;<?php echo $row['ress_phone']; ?></p>
		<p class="order-add1" style="color: #212121;">收货地址：<?php echo $row['ress_content']; ?></p>
		<hr/>
		<div class="address-cz">
			<label class="am-radio am-warning">
				<input type="radio" class="edit" name="checked" rid="<?php echo $row['rid']; ?>" data-am-ucheck <?php echo $row['checked']==1?'checked' :''; ?>> <span style="color: #FFB800">设为默认</span>
			</label>
			<a href="<?php echo url('index/ReapRess/editRess',['rid'=>$row['rid']]); ?>" style="color: #393D49;"><img src="/static/images/bj.png" width="18"/>&nbsp;编辑</a>
			<a class="del" style="color: #FF794E;">删除</a>
		</div>
	</li>
	<?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
<script>
    layui.use('form', function () {
        var form = layui.form;
        $('.edit').click(function () {
            rid = $(this).attr('rid');
            $.post("<?php echo url('index/ReapRess/defaultRess'); ?>", {rid: rid}, function () {
            });
        })
        $('.del').click(function () {
            rid = $(this).siblings('label').children('input').attr('rid');
            $.post("<?php echo url('index/ReapRess/delRess'); ?>", {rid: rid}, function (res) {
                if (res.code == 1) {
                    layer.msg(res.msg, {icon: 1}, function () {
                        location.reload();
                    });
                } else {
                    layer.msg(res.msg, {icon: 9}, function () {
                    });
                }
            });
        })
    });
</script>
<div style="height: 55px;"></div>
<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default sq-foot am-no-layout" id="">
	<ul class="am-navbar-nav am-cf am-avg-sm-5">
		<li>
			<a href="<?php echo url('index/Index/index'); ?>" class="<?php echo request()->controller()=='Index' ? 'curr':''; ?>">
				<span class="am-icon-home"></span>
				<span class="am-navbar-label">首页</span>
			</a>
		</li>
		<li>
			<a href="message.html" class="">
				<span class="am-icon-comments"></span>
				<span class="am-navbar-label">动态</span>
			</a>
		</li>
		<li>
			<a href="<?php echo url('index/ShopingCar/index'); ?>" class="<?php echo request()->controller()=='ShopingCar' ? 'curr':''; ?>">
				<span class="am-icon-shopping-cart"></span>
				<span class="am-navbar-label">购物车</span>
			</a>
		</li>
		<li>
			<a href="allorder.html" class="">
				<span class="am-icon-file-text"></span>
				<span class="am-navbar-label">订单</span>
			</a>
		</li>

		<li>
			<a href="<?php echo url('index/My/index'); ?>" class="<?php echo request()->controller()=='My' ? 'curr':''; ?>">
				<span class="am-icon-user"></span>
				<span class="am-navbar-label">我的</span>
			</a>
		</li>
	</ul>
</div>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/amazeui.min.js"></script>
</body>
</html>